#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <include/pf_ini.h>

int main()
{

    /* test ini */
    struct pf_ini* myini = pf_ini_load("./test.ini");
    const char *mystr = pf_ini_find(myini,"monoserver","dll_file",0);

    printf("get result:%s\n",mystr);
    printf("get result:%s\n",pf_ini_find(myini,"monoserver","dll_file",1));
    printf("get result:%s\n",pf_ini_find(myini,"monoserver","dll_file",2));
    printf("get result:%s\n",pf_ini_find(myini,"monoserver","dll_file",3));
    printf("get result size=%d\n",pf_ini_count(myini,"monoserver","dll_file"));

    printf("get result:%s\n",pf_ini_find(myini,"monoserver","classname",0));
    printf("get result:%s\n",pf_ini_find(myini,"configs","ttserver_service_point",0));
    printf("configs:testmine ,get result:%s\n",pf_ini_find(myini,"configs","testmine",0));

    pf_ini_clear(myini);

    return 0;
}
